package com.xqboss.apps.controller.system;


import com.xqboss.apps.domain.nft.Category;
import com.xqboss.apps.enums.category.CategoryTypeEnum;
import com.xqboss.apps.service.nft.BrandService;
import com.xqboss.apps.service.nft.CategoryService;
import com.xqboss.apps.vo.nft.BrandVO;
import com.xqboss.apps.vo.nft.CategoryVO;
import com.xqboss.common.annotation.Log;
import com.xqboss.common.core.controller.BaseController;
import com.xqboss.common.core.domain.AjaxResult;
import com.xqboss.common.core.domain.R;
import com.xqboss.common.enums.BusinessType;
import com.xqboss.common.utils.poi.ExcelUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @author Administrator
 */
@Api(tags = "系统-类别管理")
@RestController
@RequestMapping("/apps/category")
public class CategoryController extends BaseController {

    @Autowired
    private CategoryService categoryService;

    @ApiOperation("获取活动分类")
    @GetMapping("/synthesis-list")
    public R<List<Category>> synthesisList() {
        Category category = new Category();
        category.setTargetType(CategoryTypeEnum.ARTICLE);
        List<Category> list = categoryService.selectCategoryList(category);
        return R.ok(list);
    }
}